home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / OS / FWGraphx / Include / FWPriRas.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-08  |  5.7 KB  |  189 lines  |  [TEXT/MPS ]

  1. #ifndef FWPRIRAS_H
  2. #define FWPRIRAS_H
  3.  
  4. //========================================================================================
  5. //
  6. //    File:                FWPriRas.h
  7. //    Release Version:    $ 1.0d11 $
  8. //
  9. //    Copyright:    © 1993, 1995 by Apple Computer, Inc., all rights reserved.
  10. //
  11. //========================================================================================
  12.  
  13. #ifndef FWGRDEF_H
  14. #include "FWGrDef.h"
  15. #endif
  16.  
  17. #ifndef FWGCONST_H
  18. #include "FWGConst.h"
  19. #endif
  20.  
  21. #ifndef FWRASTER_H
  22. #include "FWRaster.h"
  23. #endif
  24.  
  25. //========================================================================================
  26. //    Forward Declarations
  27. //========================================================================================
  28.  
  29. class FW_CLASS_ATTR FW_PInk;
  30. class FW_CLASS_ATTR FW_PStyle;
  31. class FW_CLASS_ATTR FW_PPicture;
  32. class FW_CLASS_ATTR FW_PBitmap;
  33. class FW_CLASS_ATTR FW_CPrivTextBuffer;
  34. class FW_CLASS_ATTR FW_PFont;
  35. class FW_CLASS_ATTR FW_CGraphicContext;
  36. class FW_CLASS_ATTR FW_CRect;
  37. class FW_CLASS_ATTR FW_CPoint;
  38. class FW_CLASS_ATTR FW_CGraphicDevice;
  39. class FW_CLASS_ATTR FW_PPolygon;
  40. class FW_CLASS_ATTR FW_PIcon;
  41.  
  42. struct FW_CLASS_ATTR FW_SPlatformRect;
  43. struct FW_CLASS_ATTR FW_SPlatformPoint;
  44.  
  45. class FW_CLASS_ATTR ODShape;
  46.  
  47. //========================================================================================
  48. //    class FW_CPrivRasterizer
  49. //========================================================================================
  50.  
  51. class FW_CLASS_ATTR FW_CPrivRasterizer : public FW_CRasterizer
  52. {
  53. //---------------------------------------------------------------------------------------
  54. //    Constructor/Destructor
  55. //
  56. public:
  57.                             FW_CPrivRasterizer();
  58.     virtual                 ~FW_CPrivRasterizer();
  59.  
  60. //---------------------------------------------------------------------------------------
  61. //    Rasterizer API
  62. //
  63. public:    
  64.     virtual void             RenderRect(FW_CGraphicContext& gc,
  65.                                         const FW_CRect& rect,
  66.                                         FW_ERenderVerbs renderVerb,
  67.                                         const FW_PInk& ink,
  68.                                         const FW_PStyle& style);
  69.                             
  70.     virtual void             RenderOval(FW_CGraphicContext& gc,
  71.                                         const FW_CRect& rect,
  72.                                         FW_ERenderVerbs renderVerb,
  73.                                         const FW_PInk& ink,
  74.                                         const FW_PStyle& style);
  75.                             
  76.     virtual void             RenderRoundRect(FW_CGraphicContext& gc,
  77.                                         const FW_CRect& rect,
  78.                                         const FW_CPoint& ovalSize,
  79.                                         FW_ERenderVerbs renderVerb,
  80.                                         const FW_PInk& ink,
  81.                                         const FW_PStyle& style);
  82.                             
  83.     virtual void             RenderArc(FW_CGraphicContext& gc,
  84.                                         const FW_CRect& rect, 
  85.                                         short startAngle, short arcAngle,
  86.                                         FW_ERenderVerbs renderVerb,
  87.                                         const FW_PInk& ink,
  88.                                         const FW_PStyle& style);
  89.  
  90.     virtual void             RenderLine(FW_CGraphicContext& gc,
  91.                                         const FW_CPoint& start, 
  92.                                         const FW_CPoint& end,
  93.                                         FW_ERenderVerbs renderVerb,
  94.                                         const FW_PInk& ink,
  95.                                         const FW_PStyle& style);
  96.  
  97.     virtual void             RenderRegion(FW_CGraphicContext& gc,
  98.                                         ODShape* odShape,
  99.                                         FW_ERenderVerbs renderVerb,
  100.                                         const FW_PInk& ink,
  101.                                         const FW_PStyle& style);
  102.                                             
  103.     virtual void             RenderPolygon(FW_CGraphicContext& gc,
  104.                                         const FW_PPolygon& polygon,
  105.                                         FW_ERenderVerbs renderVerb,
  106.                                         FW_Boolean autoCloseFrame,
  107.                                         const FW_PInk& ink,
  108.                                         const FW_PStyle& style);
  109.                                             
  110.     virtual void             RenderText(FW_CGraphicContext& gc,
  111.                                         FW_CPrivTextBuffer *textBuffer,
  112.                                         const FW_CPoint& position,
  113.                                         FW_TextAlignment textAlignment,
  114.                                         FW_ERenderVerbs renderVerb,
  115.                                         const FW_PInk& ink,
  116.                                         const FW_PFont& font);
  117.                                 
  118.     virtual FW_CFixed        RenderTextBox(FW_CGraphicContext& gc,
  119.                                         FW_CPrivTextBuffer* textBuffer, 
  120.                                         const FW_CRect& box,
  121.                                         FW_TextBoxOptions options,
  122.                                         FW_ERenderVerbs renderVerb,
  123.                                         const FW_PInk& ink,
  124.                                         const FW_PFont& font);
  125.  
  126.     virtual void             TextBoxSize(FW_CGraphicContext& gc,
  127.                                         FW_CPrivTextBuffer *textBuffer, 
  128.                                         const FW_PFont& font,
  129.                                         FW_TextBoxOptions options,
  130.                                         FW_CRect& textBox);
  131.  
  132.     virtual void            TextExtent(FW_CGraphicContext& gc,
  133.                                         FW_CPrivTextBuffer* textBuffer,
  134.                                         const FW_PFont& font, 
  135.                                         FW_CPoint& textExtent);
  136.  
  137.     virtual void             RenderPicture(FW_CGraphicContext& gc,
  138.                                         FW_PPicture picture,
  139.                                         const FW_CRect& dstRect,
  140.                                         FW_ERenderVerbs renderVerb);
  141.  
  142.     virtual void             RenderBitmap(FW_CGraphicContext& gc,
  143.                                         FW_PBitmap bitmap,
  144.                                         const FW_CRect& srcRect,
  145.                                         const FW_CRect& dstRect,
  146.                                         FW_ERenderVerbs renderVerb,
  147.                                         const FW_PInk& ink);
  148.                                                     
  149.     virtual void            RenderIcon(FW_CGraphicContext& gc,
  150.                                        const FW_PIcon& icon,
  151.                                        const FW_CRect& rect,
  152.                                        FW_RenderIconOptions options,
  153.                                        FW_ERenderVerbs renderVerb);
  154.                                                     
  155. //---------------------------------------------------------------------------------------
  156. //    New API
  157. //
  158. protected:
  159.     FW_PlatformCoordinate    PrivTextBox(FW_CGraphicDevice* device,
  160.                                         FW_CPrivTextBuffer *textBuffer, 
  161.                                         const FW_SPlatformRect& box,
  162.                                         FW_TextBoxOptions options,
  163.                                         FW_Boolean draw,
  164.                                         const FW_PFont& font);
  165.  
  166. #ifdef FW_BUILD_MAC
  167.  
  168.     FW_Boolean                MacSelectInkAndStyle(FW_CGraphicDevice* device,
  169.                                         FW_EShapeCategories shapeCategory,
  170.                                         FW_ERenderVerbs renderVerb,
  171.                                         const FW_PInk& ink,
  172.                                         const FW_PStyle& style);
  173.  
  174.     FW_SPlatformPoint        MacCalcTextPosition(FW_CGraphicDevice* device,
  175.                                         short byteCount, const char* text,
  176.                                         FW_TextAlignment textAlignment,
  177.                                         const FW_SPlatformPoint& position) const;
  178.  
  179.     void                    MacStrikeOut(FW_CGraphicDevice* device,
  180.                                         short beforePosX, short beforePosY);    
  181. #endif
  182.  
  183. #ifdef FW_BUILD_WIN
  184.     DWORD                    WinConvertRasterOp(FW_TransferModes transferMode);
  185. #endif
  186. };
  187.  
  188. #endif // FWPRIRAS_H
  189.